package br.com.exemplo.swing;

import java.util.ArrayList;

import javax.swing.table.AbstractTableModel;

@SuppressWarnings("serial")
public class ConteudoTabela extends AbstractTableModel {

	private ArrayList<String> nomes = new ArrayList<String>();

	public ConteudoTabela(ArrayList<String> nomes) {
		this.nomes = nomes;
	}

	@Override
	public int getColumnCount() {
		return 1;
	}

	@Override
	public int getRowCount() {
		return nomes.size();
	}

	@Override
	public Object getValueAt(int linha, int coluna) {
		return nomes.get(linha);
	}

}
